/**
 * Copyright(c) 2014 Xunton Solutions
 *
 * History:
 *   15-12-12 下午1:40 Created by dwzhang
 */
package com.jade.bss.base.customer;

import java.io.Serializable;
import javax.persistence.*;

/**
 * 客户地址管理。
 *
 * @author <a href="mailto:dwzhang@xunton.com">dwzhang</a> 
 * @version 1.0 15-12-12 下午1:40
 */
@Entity
@Table (name = "BSS_CUSTOMER_ADDRESS")
public class CustomerAddress implements Serializable
{
    private static final String DEFAULT_ADDRESS = "default";

    @Id
    @GeneratedValue (generator = "BSS_SEQ_CUSTOMER_ADDRESS")
    @SequenceGenerator (name = "BSS_SEQ_CUSTOMER_ADDRESS", sequenceName = "BSS_SEQ_CUSTOMER_ADDRESS")
    private long id;
    @Column (name = "customer_id", updatable = false)
    private long customerId;
    @Column (name = "type", updatable = false)
    private String type = DEFAULT_ADDRESS;
    @Column (name = "name", length = 32)
    private String name;
    @Column (name = "company", length = 64)
    private String company;
    @Column (name = "country", length = 32)
    private String country;
    @Column (name = "province", length = 32)
    private String province;
    @Column (name = "city", length = 32)
    private String city;
    @Column (name = "county", length = 32)
    private String county;
   @Column (name = "address", length = 128)
    private String address;
    @Column (name = "zipcode", length = 32)
    private String zipcode;
    @Column (name = "mobile", length = 32)
    private String mobile;
    @Column (name = "phone", length = 32)
    private String phone;
    @Column (name = "email", length = 128)
    private String email;
    @Column (name = "is_default")
    private boolean isDefault;

    public long getId()
    {
        return id;
    }

    public void setId(long id)
    {
        this.id = id;
    }

    public long getCustomerId()
    {
        return customerId;
    }

    public void setCustomerId(long customerId)
    {
        this.customerId = customerId;
    }

    public String getType()
    {
        return type;
    }

    public void setType(String type)
    {
        this.type = type;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getCompany()
    {
        return company;
    }

    public void setCompany(String company)
    {
        this.company = company;
    }

    public String getCountry()
    {
        return country;
    }

    public void setCountry(String country)
    {
        this.country = country;
    }

    public String getProvince()
    {
        return province;
    }

    public void setProvince(String province)
    {
        this.province = province;
    }

    public String getCity()
    {
        return city;
    }

    public void setCity(String city)
    {
        this.city = city;
    }

    public String getCounty()
    {
        return county;
    }

    public void setCounty(String county)
    {
        this.county = county;
    }

    public String getAddress()
    {
        return address;
    }

    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getZipcode()
    {
        return zipcode;
    }

    public void setZipcode(String zipcode)
    {
        this.zipcode = zipcode;
    }

    public String getMobile()
    {
        return mobile;
    }

    public void setMobile(String mobile)
    {
        this.mobile = mobile;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public boolean isDefault()
    {
        return isDefault;
    }

    public void setDefault(boolean aDefault)
    {
        isDefault = aDefault;
    }
}
